package titan.wizards.newTemplateComponent;

import org.eclipse.jface.wizard.IWizardPage;
import titan.messages.Messages;
import titan.wizards.BaseTitanWizard;

/**
 *  Wizard to create a template of a new Titan component
 */
public class NewComponentWizard extends BaseTitanWizard {
	private NewComponentPage newComponentPage;

	public NewComponentWizard() {
		setNeedsProgressMonitor(true);
		newComponentPage = new NewComponentPage();
	}

	public void addPages() {
		addPage(newComponentPage);
	}

	public void init() throws Exception {
		newComponentPage.init(project);
	}

	public IWizardPage getFirstPage() {
		return newComponentPage;
	}

	public boolean performFinish() {
		return newComponentPage.createComponent(project);
	}

	public boolean canFinish() {
		return newComponentPage.canFinish();
	}

	public String getWindowTitle() {
		return new String(Messages.NewComponent);
	}
}